/*
 * ************************************************
 *
 *              STM32 blink gcc demo
 *
 *  CPU: STM32F103C8
 *  PIN: PA1
 *
 * ************************************************
 */

#include "stm32f10x.h"
#include "drv_init.h"
#include "my_led.h"
#include "evos_app.h"
#include "timer_schedule.h"
float period = 0;
float duty   = 0;

int main(void)
{
    drv_init();
    evos_app_init();
    eos_timer_schedule_init();
    eos_led_init();
    eos_run();
    while (1) {
        // TIM_ClearFlag(TIM1, TIM_FLAG_Trigger);
        // while (TIM_GetFlagStatus(TIM1, TIM_FLAG_Trigger) == RESET);
        // {
        //     LED_ON;
        //     period = TIM_GetCapture1(TIM1) * 1.0e-6f * 1.0e3f;
        //     duty   = TIM_GetCapture2(TIM1) * 1.0f / TIM_GetCapture1(TIM1) * 1.0f * 100;
        // }
    }
    return 0;
}
